﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ChargingSystem4.EUc
{
    public partial class UcBackBA : UserControl
    {
        public UcBackBA()
        {
            InitializeComponent();
        }

        private void UcBackBA_Paint(object sender, PaintEventArgs e)
        {
            #region MyRegion
            int itemWidth = (this.Width / 11);
            int itemHeight = (this.Height / 12);

            int allHeight = this.Height - 3 - 6;
            int allWidth = this.Width - 3 - 6;

            Pen myPen = new Pen(Color.Red);

            myPen.Width = 3;

            #region A

            Point[] points = {
                new Point(3+6,0),
                new Point(3+6,allHeight),
                new Point(this.Width,allHeight)
             };
            e.Graphics.DrawLines(myPen, points);



            #region jian tou 
            Point[] pointsAA = {
                new Point(3+6,0),
                new Point(0,12+6)
             };
            e.Graphics.DrawLines(myPen, pointsAA);

            Point[] pointsAB = {
                new Point(3+6,0),
                new Point(12+6,12+6)
             };
            e.Graphics.DrawLines(myPen, pointsAB);



            Point[] pointsBA = {
                new Point(this.Width,allHeight),
               new Point(this.Width-18 ,allHeight-9)
             };
            e.Graphics.DrawLines(myPen, pointsBA);

            Point[] pointsBB = {
                      new Point(this.Width,allHeight),
                     new Point(this.Width-18 ,allHeight+9)
             };
            e.Graphics.DrawLines(myPen, pointsBB);
            #endregion





            #endregion

            #region B


            Point[] pointsLine = {



                new Point(itemWidth*0+6,itemHeight*10),
                new Point(itemWidth*1+6,itemHeight*10),
                new Point(itemWidth*1+6,itemHeight*9),
                new Point(itemWidth*2+6,itemHeight*9),
                new Point(itemWidth*2+6,itemHeight*8),
                new Point(itemWidth*3+6,itemHeight*8),
                new Point(itemWidth*3+6,itemHeight*7),
                new Point(itemWidth*4+6,itemHeight*7),
                new Point(itemWidth*4+6,itemHeight*6),
                new Point(itemWidth*5+6,itemHeight*6),
                new Point(itemWidth*5+6,itemHeight*5),
                new Point(itemWidth*6+6,itemHeight*5),
                new Point(itemWidth*6+6,itemHeight*4),
                new Point(itemWidth*7+6,itemHeight*4),
                new Point(itemWidth*7+6,itemHeight*3),
                new Point(itemWidth*8+6,itemHeight*3),
                new Point(itemWidth*8+6,itemHeight*4),
                new Point(itemWidth*9+6,itemHeight*4),
                new Point(itemWidth*9+6,itemHeight*5),
                new Point(allWidth+6,itemHeight*5) ,
                new Point(allWidth+6,itemHeight*10)
             };
            e.Graphics.DrawLines(myPen, pointsLine);



            #endregion

            #endregion


        }
    }
}
